1. Technical Field
The embodiments herein generally relate to a filter and, more particularly, to an implementation of a digital filter and an adaptive digital filter by exploiting statistical properties of an incoming signal and filter coefficients.
2. Description of the Related Art
In modern communication systems, there are instances in which an incoming signal to a system contains additional noise which can degrade the quality of the desired signal. In such cases, a filter is used to remove additional noise thus preventing the incoming signal from further degradation. A Finite Impulse Response (FIR) filter is one of the primary types of filters used in Digital Signal Processing. The finite impulse response (FIR) filter is a signal processing filter with an impulse response (e.g., a response to any finite length input) of a finite duration, since it settles to zero within a finite time. This is in contrast to an infinite impulse response (IIR) filter, which has internal feedback and that may continue to respond indefinitely (e.g., decaying). The impulse response of an Nth-order discrete-time FIR filter (e.g., with a Kronecker delta impulse input) lasts for N samples and then dies to zero. Typically digital filters (e.g., normal FIR filters and IIR filters) are designed in a high level language like Matlab or by using filter design packages. The main parameters for determining merit of a design of a digital filter are performance of the digital filter in terms of a SNR metric, and efficiency of implementation of the digital filter in terms of area and power.
Given a particular SNR requirement, filter designers optimize the implementation by trading off one or more parameters such as i) sampling rate of an incoming signal, ii) bit widths of the incoming signal, iii) bit widths of filter coefficients of a filter and iv) choice of the filter structure. In the case of non-adaptive filters, filter coefficients are a set of constants used to multiply against delayed sample values, while in case of adaptive filters the filter coefficients are adaptively changed based on an adaptive algorithm. The above mentioned parameters ii) and iii) impact the bit width of a multiply and accumulate (MAC) unit, which is a fundamental building block for most filters. Further, the MAC unit performs a multiply and accumulate operation by multiplying a filter coefficient by a corresponding delayed data sample and accumulating the result. Bit widths of the MAC unit directly impact area and power of the filter.
A filter may be implemented as a software kernel for execution on a Digital Signal Processor (DSP) or as a hardwired custom hardware in digital logic. Bit widths of an incoming signal are decided based on the above implementation type. For a custom hardwired filter, an ADC precision or an implementation margin provided by a system designer to a block decides the bit width of the incoming signal. Whereas, filter coefficients bit widths are decided by a performance requirement of the filter. However in software implementations the bit width of the incoming data sample is quantized to a set of predefined bit widths defined by the DSP or CPU architectures. Typically, the bit widths are a set of 8/16/32/64.
A filter has many taps or coefficients as shown in accordance with the equation:y(n)=Σk=0N-1w[k]·x[n−k]
The above implementations (both hardwired and software) assume that each incoming data sample and filter coefficient need the worst case precision. These implementations are inefficient in terms of both area and power as not all the incoming data samples and the coefficients need the worst case bit-width.
Existing implementations of optimized FIR filters with reduced gate counts involve i) choosing from a variety of existing filter structures to vary an order of operations and reduced precision (e.g., a transpose form, DF1 and DF2), and ii) using strength reduction techniques to convert multipliers to shifters (typically used in the filter coefficient design). This first technique gives limited area reduction whereas the second technique results in performance loss. Another optimization technique involves a successive approximation method of computing a given filtered value through multiple iterations. This method takes too long and is not suitable for software implementations of filters and high speed hardware implementations.
Further, an adaptive filter is useful whenever statistics of incoming signals to a filter are unknown or time varying. Hence, the design requirements for an adaptive filter cannot be specified easily. Examples of such applications include system identification, channel equalization, channel identification and interference suppression in communications systems. Typically the adaptive filter measures an output signal of the filter, and compares it to a desired output signal dictated by a true system. By observing an error between the output signal of the filter and the desired output signal, an adaptation algorithm updates filter coefficients with an aim to minimize an objective function.
FIG. 1 shows a schematic diagram of a typical adaptive filter 102, where x(k), y(k), d(k), and e(k) are the input, output, desired output and error signals of the adaptive filter 102 for a time instant k. As can be seen from FIG. 1, the adaptive filter 102 is a nonlinear filter through its dependence on the incoming signals, although, at a given time instant it can act as a linear filter. The filter coefficients w(k) are dependent on a correction factor to the coefficients (ΔW(k)) generated by an adaptive algorithm 104. Most of adaptive filters are digital filters and a large number of taps results in large area and power consumption. Accordingly, there is a need for an efficient implementation of a digital filter without reducing system performance.